#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>


int main()
{
	int n = 0, i = 0, arr[100] = { 0 }, sum = 0;
	scanf("%d", &n);
	arr[0] = 2;
	for (i = 1; i < n; i++)
	{
		arr[i] = arr[i - 1] + 3;
	}
	for (i = 0; i < n; i++)
	{
		sum += arr[i];
	}
	printf("%d\n", sum);
	return 0;
}